#ifndef REGULAREXPRESSIONS_MATCH_H
#define REGULAREXPRESSIONS_MATCH_H

#include <vector>
#include <stdexcept>

extern "C"
{
	#include <regex.h>
}

#include "Group.hpp"


namespace RegularExpressions
{
	class Match
	{
		private:
		
		std::vector<Group>	_groups;
		
		Match(int nbGroups);
		
		
		public:
		
		bool success() const;
		int countGroups() const;
		const Group& group(int id) const throw(std::out_of_range);
		const std::vector<Group>& groups() const;
		
		
		friend class Regex;
	};
}


#endif


